package com.javaweb.dao;

import com.javaweb.model.Article;

import java.util.Date;
import java.util.List;

public interface ArticleDao {
    public int insert(Article article);

    public int updateContent(Integer id, String newContent);

    public int updateTitle(Integer id, String newTitle);

    public int deleteById(Integer id);

    List<Article> selectByUserId(Integer userId);

    public List<Article> selectByKeyword(String keyword) ;

    public List<Article> selectByTimePeriod(Date startTime, Date endTime);

    public List<Article> selectByTag(Integer tagId);

    public List<Article> selectByCategory(Integer categoryId);

    public int updateStatus(Integer id, Integer status) ;

}
